package com.village.zpark.pojo;

import com.village.zpark.common.DateUtil;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
@Table(name="environment")
public class Environment {
    @Id
    @Column(name="id")
    private Integer id;
    @Column(name="monitor")//监控人员
    private String monitor;
    @Column(name="monitoringtime")//监控时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date monitoringtime;
    @Column(name="airquality")
    private String airquality;//空气质量
    @Column(name="waterquality")
    private String waterquality;//水质
    @Column(name="monitoringlocation")
    private String monitoringlocation;//监控地点


    public String getMonitoringtimeStr() {
        return DateUtil.dateConvert(monitoringtime);
    }

}
